use serde::{Deserialize, Serialize};
use validator::Validate;
use wanmesh_common::validator::validate_string_is_not_empty;

#[derive(Serialize, Deserialize, Validate, Debug, Clone)]
pub struct AddParams {
    #[validate(custom(function = "validate_string_is_not_empty"))]
    pub endpoint_id: String,
    #[validate(custom(function = "validate_string_is_not_empty"))]
    pub peer_endpoint_id: String,
}

#[derive(Serialize, Deserialize, Validate, Debug, Clone)]
pub struct AddResponseData {
    #[validate(custom(function = "validate_string_is_not_empty"))]
    pub endpoint_peer_id: String,
}

#[derive(Serialize, Deserialize, Validate, Debug, Clone, Default, Eq, PartialEq)]
pub struct Filter {
    pub endpoint_peer_id: Option<String>,
    pub endpoint_id: Option<String>,
    pub peer_endpoint_id: Option<String>,
}
